package com.bookstore.dao;

import com.bookstore.entity.User;

import java.util.Date;
import java.util.List;

public interface UserDao {
    int insertUser(User user);

    int updateUser(User user);

    int deleteUser(Long userId);

    User queryUserByUsername(String username);

    User queryUserByUsernameAndPassword(User user);

    List<User> queryAllUsers();

    User queryUserById(Long userId);

    /**
     * 更新上次登录时间
     *
     * @param userId
     * @return
     */
    int updateLastLoginTime(Long userId, Date loginTime);
}
